//
//  BeforeScanSingleton.m
//  礼物说
//
//  Created by dllo on 16/5/6.
//  Copyright © 2016年 sunzhichao. All rights reserved.
//

#import "BeforeScanSingleton.h"
#import "LBXScanView.h"

static BeforeScanSingleton *_beforeScan;

@interface BeforeScanSingleton ()

@property (strong, nonatomic) UIViewController *viewController;

@end

@implementation BeforeScanSingleton

//+ (BeforeScanSingleton *)shareScan {
//    static dispatch_once_t onceToken;
//    dispatch_once(&onceToken, ^{
//        _beforeScan = [[BeforeScanSingleton alloc]init];
//    });
//    return _beforeScan;
//}
//
//- (void)ShowSelectedType:(ScanStyle)type WithViewController:(UIViewController *)vc {
//    
//    if (![self cameraPemission])
//    {
//        [self showError:@"没有摄像机权限"];
//        return ;
//    }
//    _viewController = vc;
//    UIBarButtonItem *backBar = [UIBarButtonItem new];
//    backBar.title = @"";
//    _viewController.navigationItem.backBarButtonItem = backBar;
//    
//    switch (type) {
//        case AliPayStyle:
//            [self AlipayStyleScan];
//            break;
//            
//        default:
//            break;
//    }
//}
//#pragma mark - 检测是否有权限打开相机
//- (BOOL)cameraPemission
//{
//    BOOL isHavePemission = NO;
//    if ([AVCaptureDevice respondsToSelector:@selector(authorizationStatusForMediaType:)])
//    {
//        AVAuthorizationStatus permission =
//        [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];
//        
//        switch (permission) {
//            case AVAuthorizationStatusAuthorized:
//                isHavePemission = YES;
//                break;
//            case AVAuthorizationStatusDenied:
//            case AVAuthorizationStatusRestricted:
//                break;
//            case AVAuthorizationStatusNotDetermined:
//                isHavePemission = YES;
//                break;
//        }
//    }
//    return isHavePemission;
//}
//
//#pragma mark - 提示框
//- (void)showError:(NSString*)str
//{
//    [LBXAlertAction showAlertWithTitle:@"提示" msg:str chooseBlock:nil buttonsStatement:@"知道了",nil];
//}


@end
